﻿<%@ Page Title="" Language="VB" MasterPageFile="~/mobile/MobileAdmin.master" AutoEventWireup="false" CodeFile="profile.aspx.vb" Inherits="mobile_profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div  id="profile">   
            <asp:HiddenField ID="UniID" runat="server" />
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" DataSourceID="SqlDataSource1" Width="100%">
        <EditItemTemplate>
            FIRST NAME:
            <asp:TextBox ID="FIRST_NAMETextBox" runat="server" Text='<%# Bind("FIRST_NAME") %>' />
            <br />
            LAST NAME:
            <asp:TextBox ID="LAST_NAMETextBox" runat="server" Text='<%# Bind("LAST_NAME") %>' />
            <br />
            EMAIL:
            <asp:TextBox ID="EMAILTextBox" runat="server" Text='<%# Bind("EMAIL") %>' />
            <br />
            PHONE:
            <asp:TextBox ID="PHONETextBox" runat="server" Text='<%# Bind("PHONE") %>' />
            <br />
            UNIVERSITY:
            <asp:DropDownList ID="uniList" runat="server" DataSourceID="SqlDataSource1" data-mini="true" 
                DataTextField="UNIVERISTY_NAME" DataValueField="ID" 
                AppendDataBoundItems="True" SelectedValue='<%# Bind("UNIVERSITY_ID") %>'>
                <asp:ListItem></asp:ListItem>
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
                SelectCommand="SELECT * FROM [UNIVERSITIES]"></asp:SqlDataSource>
            <br />
            UNI/STUDENT ID:
            <asp:TextBox ID="STUDENT_IDTextBox" runat="server" Text='<%# Bind("STUDENT_ID") %>' />
            <br />
            SUBJECT AREA:
            <asp:DropDownList ID="SubjectList" runat="server"  data-mini="true" 
                SelectedValue='<%# Bind("SUBJECT_AREA") %>' >
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>Accounting or Business</asp:ListItem>
                <asp:ListItem>Computer Sciences</asp:ListItem>
                <asp:ListItem>Creative art or design</asp:ListItem>
                <asp:ListItem>Economics or Finance</asp:ListItem>
                <asp:ListItem>Education</asp:ListItem>
                <asp:ListItem>Engineering or Technology</asp:ListItem>
                <asp:ListItem>Government, Politics, International Relations or International development</asp:ListItem>
                <asp:ListItem>Humanities (History, Philosophy and other Humanities)</asp:ListItem>
                <asp:ListItem>Languages</asp:ListItem>
                <asp:ListItem>Law</asp:ListItem>
                <asp:ListItem>Marketing or Management</asp:ListItem>
                <asp:ListItem>Medicine and Dentistry</asp:ListItem>
                <asp:ListItem>Science (Including Medicine, Pharmacy and other science courses)</asp:ListItem>
                <asp:ListItem>Social Sciences (Including Geography, Sociology and other social sciences)</asp:ListItem>
                <asp:ListItem>Other</asp:ListItem>
            </asp:DropDownList>
            <br />
            YEAR OF STUDY:
            <asp:DropDownList ID="yearList" runat="server"  data-mini="true" SelectedValue='<%# Bind("YEAR_OF_STUDY") %>'  > 
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>First</asp:ListItem>
                <asp:ListItem>Second</asp:ListItem>
                <asp:ListItem>Third</asp:ListItem>
                <asp:ListItem>Fourth</asp:ListItem>
                <asp:ListItem>Graduated</asp:ListItem>
                <asp:ListItem>Post Graduate</asp:ListItem>
                <asp:ListItem>Other</asp:ListItem>
            </asp:DropDownList>
            <br />
            DEGREE TYPE:
            <asp:DropDownList ID="DegreeList" runat="server" data-mini="true" SelectedValue='<%# Bind("DEGREE_TYPE") %>' >
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>BA or BSc</asp:ListItem>
                <asp:ListItem>BEng or MEng</asp:ListItem>
                <asp:ListItem>MA or MSc</asp:ListItem>
                <asp:ListItem>MBA</asp:ListItem>
                <asp:ListItem>Mphil or PhD</asp:ListItem>
                <asp:ListItem>Other</asp:ListItem>
            </asp:DropDownList>
            <br />
            CAREER_INTEREST:
            <asp:DropDownList ID="careerList" runat="server" data-mini="true" SelectedValue='<%# Bind("CAREER_INTEREST") %>'>
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>Accountancy & Professional Services</asp:ListItem>
                <asp:ListItem>Banking & Finance </asp:ListItem>
                <asp:ListItem>Business & Entrepreneurship</asp:ListItem>
                <asp:ListItem>Creative & Fashion</asp:ListItem>
                <asp:ListItem>Management and Strategy Consultancy</asp:ListItem>
                <asp:ListItem>Education & Teaching</asp:ListItem>
                <asp:ListItem>Engineering & industrial companies</asp:ListItem>
                <asp:ListItem>International Development</asp:ListItem>
                <asp:ListItem>Law</asp:ListItem>
                <asp:ListItem>Media & Publishing</asp:ListItem>
                <asp:ListItem>Medicine & Pharmaceutical </asp:ListItem>
                <asp:ListItem>Oil & Gas</asp:ListItem>
                <asp:ListItem>Public Sector</asp:ListItem>
                <asp:ListItem>Retail</asp:ListItem>
                <asp:ListItem>Software technology, ICT & Telecoms</asp:ListItem>
                <asp:ListItem>Third Sector or Charities</asp:ListItem>
                <asp:ListItem>I'm not sure</asp:ListItem>
                <asp:ListItem>Others</asp:ListItem>
            </asp:DropDownList>
            <br />
            GENDER:
            <asp:DropDownList ID="genderList" runat="server" data-mini="true" SelectedValue='<%# Bind("GENDER") %>' >
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>Male</asp:ListItem>
                <asp:ListItem>Female</asp:ListItem>
            </asp:DropDownList>
            <br />
            ETHNICITY:
            <asp:DropDownList ID="ethnicityList" runat="server" data-mini="true" SelectedValue='<%# Bind("ETHNICITY") %>' >
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>Black African</asp:ListItem>
                <asp:ListItem>Black Caribbean</asp:ListItem>
                <asp:ListItem>Mixed</asp:ListItem>
                <asp:ListItem>White</asp:ListItem>
                <asp:ListItem>Asian or Asian British</asp:ListItem>
                <asp:ListItem>Latino</asp:ListItem>
                <asp:ListItem>Other</asp:ListItem>
            </asp:DropDownList>
            <br />
           <%-- UK CITIZEN:
            <asp:DropDownList ID="citizenList" runat="server" data-mini="true" 
                SelectedValue='<%# Bind("UK_CITIZEN") %>'>
                <asp:ListItem></asp:ListItem>
                <asp:ListItem Value="True">Yes</asp:ListItem>
                <asp:ListItem Value="False">No</asp:ListItem>
            </asp:DropDownList>
            <br />--%>
            AGE GROUP:
            <asp:DropDownList ID="ageList" runat="server" data-mini="true" Selectedvalue='<%# Bind("AGE_GROUP") %>'>
                <asp:ListItem></asp:ListItem>
                <asp:ListItem>under 18</asp:ListItem>
                <asp:ListItem>18 - 21</asp:ListItem>
                <asp:ListItem>22 - 25</asp:ListItem>
                <asp:ListItem>over 25</asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:CheckBox ID="CheckBox1" runat="server" Text="Has member paid?" 
                Checked='<%# Bind("PAID") %>' />
            <br />
            <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" 
                Text="Update" />
            &nbsp;<asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" 
                CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            FIRST_NAME:
            <asp:TextBox ID="FIRST_NAMETextBox" runat="server" Text='<%# Bind("FIRST_NAME") %>' />
            <br />
            LAST_NAME:
            <asp:TextBox ID="LAST_NAMETextBox" runat="server" Text='<%# Bind("LAST_NAME") %>' />
            <br />
            EMAIL:
            <asp:TextBox ID="EMAILTextBox" runat="server" Text='<%# Bind("EMAIL") %>' />
            <br />
            PHONE:
            <asp:TextBox ID="PHONETextBox" runat="server" Text='<%# Bind("PHONE") %>' />
            <br />
            UNIVERSITY_ID:
            <asp:TextBox ID="UNIVERSITY_IDTextBox" runat="server" Text='<%# Bind("UNIVERSITY_ID") %>' />
            <br />
            STUDENT_ID:
            <asp:TextBox ID="STUDENT_IDTextBox" runat="server" Text='<%# Bind("STUDENT_ID") %>' />
            <br />
            CREATED_DATE:
            <asp:TextBox ID="CREATED_DATETextBox" runat="server" Text='<%# Bind("CREATED_DATE") %>' />
            <br />
            SUBJECT_AREA:
            <asp:TextBox ID="SUBJECT_AREATextBox" runat="server" Text='<%# Bind("SUBJECT_AREA") %>' />
            <br />
            YEAR_OF_STUDY:
            <asp:TextBox ID="YEAR_OF_STUDYTextBox" runat="server" Text='<%# Bind("YEAR_OF_STUDY") %>' />
            <br />
            DEGREE_TYPE:
            <asp:TextBox ID="DEGREE_TYPETextBox" runat="server" Text='<%# Bind("DEGREE_TYPE") %>' />
            <br />
            CAREER_INTEREST:
            <asp:TextBox ID="CAREER_INTERESTTextBox" runat="server" Text='<%# Bind("CAREER_INTEREST") %>' />
            <br />
            GENDER:
            <asp:TextBox ID="GENDERTextBox" runat="server" Text='<%# Bind("GENDER") %>' />
            <br />
            ETHNICITY:
            <asp:TextBox ID="ETHNICITYTextBox" runat="server" Text='<%# Bind("ETHNICITY") %>' />
            <br />
            UK_CITIZEN:
            <asp:CheckBox ID="UK_CITIZENCheckBox" runat="server" Checked='<%# Bind("UK_CITIZEN") %>' />
            <br />
            AGE_GROUP:
            <asp:TextBox ID="AGE_GROUPTextBox" runat="server" Text='<%# Bind("AGE_GROUP") %>' />
            <br />
            UNIVERISTY_NAME:
            <asp:TextBox ID="UNIVERISTY_NAMETextBox" runat="server" Text='<%# Bind("UNIVERISTY_NAME") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" 
                Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" 
                CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            <table class="style1">
                <tr>
                    <td>
                        FIRST NAME</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server" ReadOnly="True" 
                            Text='<%# Eval("FIRST_NAME") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        LAST NAME</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server" ReadOnly="True" 
                            Text='<%# Eval("LAST_NAME") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        EMAIL</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox3" runat="server" ReadOnly="True" 
                            Text='<%# Eval("EMAIL") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        PHONE</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox4" runat="server" ReadOnly="True" 
                            Text='<%# Eval("PHONE") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        UNIVERSITY</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox5" runat="server" ReadOnly="True" 
                            Text='<%# Eval("UNIVERISTY_NAME") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        SUBJECT AREA</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox6" runat="server" ReadOnly="True" 
                            Text='<%# Eval("SUBJECT_AREA") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        YEAR OF STUDY</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox7" runat="server" ReadOnly="True" 
                            Text='<%# Eval("YEAR_OF_STUDY") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        DEGREE TYPE</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox8" runat="server" ReadOnly="True" 
                            Text='<%# Eval("DEGREE_TYPE") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        CAREER INTEREST</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox9" runat="server" ReadOnly="True" 
                            Text='<%# Eval("CAREER_INTEREST") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        GENDER</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="TextBox10" runat="server" ReadOnly="True" 
                            Text='<%# Eval("GENDER") %>' Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    <asp:Button ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" 
                Text="Edit" />
            &nbsp;<asp:Button ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" 
                Text="Delete"  />
                        </td>
                </tr>
            </table>
            
        </ItemTemplate>
    </asp:FormView>
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
        
                SelectCommand="SELECT MEMBERS.ID, MEMBERS.FIRST_NAME, MEMBERS.LAST_NAME, MEMBERS.EMAIL, MEMBERS.PHONE, MEMBERS.UNIVERSITY_ID, MEMBERS.STUDENT_ID, MEMBERS.CREATED_DATE, MEMBERS.SUBJECT_AREA, MEMBERS.YEAR_OF_STUDY, MEMBERS.DEGREE_TYPE, MEMBERS.CAREER_INTEREST, MEMBERS.GENDER, MEMBERS.ETHNICITY, MEMBERS.UK_CITIZEN, MEMBERS.AGE_GROUP, UNIVERSITIES.UNIVERISTY_NAME, MEMBERS.PAID FROM MEMBERS INNER JOIN UNIVERSITIES ON MEMBERS.UNIVERSITY_ID = UNIVERSITIES.ID WHERE (MEMBERS.ID = @ID)" 
                DeleteCommand="DELETE FROM [MEMBERS] WHERE [ID] = @ID" 
                InsertCommand="INSERT INTO [MEMBERS] ([FIRST_NAME], [LAST_NAME], [EMAIL], [PHONE], [UNIVERSITY_ID], [STUDENT_ID], [CREATED_DATE], [SUBJECT_AREA], [YEAR_OF_STUDY], [DEGREE_TYPE], [CAREER_INTEREST], [GENDER], [ETHNICITY], [UK_CITIZEN], [AGE_GROUP]) VALUES (@FIRST_NAME, @LAST_NAME, @EMAIL, @PHONE, @UNIVERSITY_ID, @STUDENT_ID, @CREATED_DATE, @SUBJECT_AREA, @YEAR_OF_STUDY, @DEGREE_TYPE, @CAREER_INTEREST, @GENDER, @ETHNICITY, @UK_CITIZEN, @AGE_GROUP)" 
                UpdateCommand="UPDATE [MEMBERS] SET [FIRST_NAME] = @FIRST_NAME, [LAST_NAME] = @LAST_NAME, [EMAIL] = @EMAIL, [PHONE] = @PHONE, [UNIVERSITY_ID] = @UNIVERSITY_ID, [STUDENT_ID] = @STUDENT_ID, [CREATED_DATE] = @CREATED_DATE, [SUBJECT_AREA] = @SUBJECT_AREA, [YEAR_OF_STUDY] = @YEAR_OF_STUDY, [DEGREE_TYPE] = @DEGREE_TYPE, [CAREER_INTEREST] = @CAREER_INTEREST, [GENDER] = @GENDER, [ETHNICITY] = @ETHNICITY, [AGE_GROUP] = @AGE_GROUP, [PAID] = @PAID WHERE [ID] = @ID">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="FIRST_NAME" Type="String" />
            <asp:Parameter Name="LAST_NAME" Type="String" />
            <asp:Parameter Name="EMAIL" Type="String" />
            <asp:Parameter Name="PHONE" Type="String" />
            <asp:Parameter Name="UNIVERSITY_ID" Type="Int32" />
            <asp:Parameter Name="STUDENT_ID" Type="String" />
            <asp:Parameter Name="CREATED_DATE" Type="DateTime" />
            <asp:Parameter Name="SUBJECT_AREA" Type="String" />
            <asp:Parameter Name="YEAR_OF_STUDY" Type="String" />
            <asp:Parameter Name="DEGREE_TYPE" Type="String" />
            <asp:Parameter Name="CAREER_INTEREST" Type="String" />
            <asp:Parameter Name="GENDER" Type="String" />
            <asp:Parameter Name="ETHNICITY" Type="String" />
            <asp:Parameter Name="UK_CITIZEN" Type="Boolean" />
            <asp:Parameter Name="AGE_GROUP" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="FIRST_NAME" Type="String" />
            <asp:Parameter Name="LAST_NAME" Type="String" />
            <asp:Parameter Name="EMAIL" Type="String" />
            <asp:Parameter Name="PHONE" Type="String" />
            <asp:Parameter Name="UNIVERSITY_ID" Type="Int32" />
            <asp:Parameter Name="STUDENT_ID" Type="String" />
            <asp:Parameter Name="CREATED_DATE" Type="DateTime" />
            <asp:Parameter Name="SUBJECT_AREA" Type="String" />
            <asp:Parameter Name="YEAR_OF_STUDY" Type="String" />
            <asp:Parameter Name="DEGREE_TYPE" Type="String" />
            <asp:Parameter Name="CAREER_INTEREST" Type="String" />
            <asp:Parameter Name="GENDER" Type="String" />
            <asp:Parameter Name="ETHNICITY" Type="String" />
            <asp:Parameter Name="AGE_GROUP" Type="String" />
            <asp:Parameter Name="PAID" Type="Boolean" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</div>
</asp:Content>

